<script>
    $(function() {
        $("a").button();
        $("a").click(function() { return true; });
    });
</script>
<div style="width: 100%;height: 100%;background-color: #222222" align="center">
<div style="width: 80%;height: 100%;background-color:#eeeeee" align="center" class="ui-widget ui-corner-all">
 <div style="width: 100%;padding: 10px" align="left"><a href="<?php echo url::base()?>/admin/patient" class="ui-button ui-widget ui-state-default ui-corner-all">กลับ</a></div>
    <br>
<form method="get" action="<?php URL::base()?>patient_edit" target="">
        <table width="500" class="ui-widget ui-widget-content ui-corner-all" cellspacing="0" cellpadding="3">
            <thead><tr class="ui-widget-header"><td colspan="5">แก้ไขประวัติคนไข้</td></tr></thead>
            <tbody>
                <tr><td valign="top" align="left" style="padding-left: 10px">ชื่อ</td><td align="left"><input name="p_fname" type="text" value="<?php echo $patient['p_fname']?>"> </td></tr>
                <tr><td valign="top" align="left" style="padding-left: 10px">นามสกุล</td><td align="left"><input name="p_lname" type="text" value="<?php echo $patient['p_lname']?>"> </td></tr>
                <tr><td valign="top" align="left" style="padding-left: 10px">เพศ</td><td  align="left">ชาย <input name="p_sex" type="radio" value="1" <?php if($patient['p_sex']=="1") echo "checked"?>> หญิง <input name="p_sex" type="radio" value="0" <?php if($patient['p_sex']=="0") echo "checked"?>></td></tr>
                <tr><td valign="top" align="left" style="padding-left: 10px">วันเดือนปีเกิด</td><td align="left"><input type="text" id="dateInput" name="p_bday" value="<?php echo $patient['p_bday']?>"> </td></tr>
                <tr><td valign="top" align="left" style="padding-left: 10px">ที่อยู่</td><td align="left"><textarea cols="20" rows="3" name="p_address"><?php echo $patient['p_address']?></textarea>                        </td></tr>
                <tr><td valign="top" align="left" style="padding-left: 10px">โทรศัพท์</td><td align="left"><input type="text" name="p_phone" value="<?php echo $patient['p_phone']?>"></td></tr>
                <tr><td align="center" colspan="2" ><input class="ui-button ui-widget ui-state-default ui-corner-all" type="submit" value="แก้ไข">                        
                    </td>
                </tr>
                <tr><td colspan="8" align="left" style="color: blue"><?php echo $message?></td></tr>
            </tbody>
        </table>
        <input type="hidden" value="<?php echo $p_id?>" name="p_id">
        <input type="hidden" value="edit" name="method">
    </form>
</div>
    </div>
